home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
600 Games
/
600games.iso
/
Nave
/
Beteroid.swf
/
scripts
/
frame_4
/
PlaceObject2_29_222
/
CLIPACTIONRECORD onClipEvent(mouseMove).as
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
2006-06-13
|
331 b
|
18 lines
onClipEvent(mouseMove){
mx = _root._xmouse;
my = _root._ymouse;
x = mx - _X;
y = my - _Y;
r = Math.sqrt(x * x + y * y);
sinTheta = y / r;
theta = Math.asin(sinTheta);
if(mx < _X)
{
_rotation = 180 - theta / 0.0175;
}
if(_X < mx)
{
_rotation = theta / 0.0175;
}
}